// @ts-ignore

 
import { api } from '@/utils/api';

/** 删除巡检记录 POST /proInspectionRecord/delete */
export async function proInspectionRecordDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proInspectionRecordDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proInspectionRecordDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proInspectionRecordDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proInspectionRecord/delete`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proInspectionRecord/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 处理巡检异常记录 POST /proInspectionRecord/handle */
export async function proInspectionRecordHandle(
  body: BIZAPI.ProInspectionPointRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proInspectionRecordHandle(
  body: BIZAPI.ProInspectionPointRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proInspectionRecordHandle(
  body: BIZAPI.ProInspectionPointRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proInspectionRecordHandle(
  body: BIZAPI.ProInspectionPointRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proInspectionRecord/handle`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proInspectionRecord/handle`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取巡检点位记录列表数据 POST /proInspectionRecord/list/point */
export async function proInspectionRecordListPoint(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultListProInspectionPointRecordEntity>;

export async function proInspectionRecordListPoint(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultListProInspectionPointRecordEntity>>;

export async function proInspectionRecordListPoint(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultListProInspectionPointRecordEntity>;

export async function proInspectionRecordListPoint(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultListProInspectionPointRecordEntity>(
      `/app/proInspectionRecord/list/point`,
      {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json'
        },
        data: body,
        ...(options || {}),
        tupleResponse: true
      }
    );
  }

  return api<BIZAPI.IResultListProInspectionPointRecordEntity>(
    `/app/proInspectionRecord/list/point`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {})
    }
  );
}

/** 获取巡检记录分页数据 POST /proInspectionRecord/page */
export async function proInspectionRecordPage(
  body: BIZAPI.ProInspectionRecordQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageProInspectionRecordEntity>;

export async function proInspectionRecordPage(
  body: BIZAPI.ProInspectionRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageProInspectionRecordEntity>>;

export async function proInspectionRecordPage(
  body: BIZAPI.ProInspectionRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageProInspectionRecordEntity>;

export async function proInspectionRecordPage(
  body: BIZAPI.ProInspectionRecordQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageProInspectionRecordEntity>(`/app/proInspectionRecord/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultIPageProInspectionRecordEntity>(`/app/proInspectionRecord/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取巡检点位记录分页数据 POST /proInspectionRecord/page/point */
export async function proInspectionRecordPagePoint(
  body: BIZAPI.ProInspectionPointRecordQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageProInspectionPointRecordEntity>;

export async function proInspectionRecordPagePoint(
  body: BIZAPI.ProInspectionPointRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageProInspectionPointRecordEntity>>;

export async function proInspectionRecordPagePoint(
  body: BIZAPI.ProInspectionPointRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageProInspectionPointRecordEntity>;

export async function proInspectionRecordPagePoint(
  body: BIZAPI.ProInspectionPointRecordQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageProInspectionPointRecordEntity>(
      `/app/proInspectionRecord/page/point`,
      {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json'
        },
        data: body,
        ...(options || {}),
        tupleResponse: true
      }
    );
  }

  return api<BIZAPI.IResultIPageProInspectionPointRecordEntity>(
    `/app/proInspectionRecord/page/point`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {})
    }
  );
}

/** 查询点位是否存在未完成缺陷 POST /proInspectionRecord/queryPointHasUnfinishedDefect */
export async function proInspectionRecordQueryPointHasUnfinishedDefect(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultBoolean>;

export async function proInspectionRecordQueryPointHasUnfinishedDefect(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultBoolean>>;

export async function proInspectionRecordQueryPointHasUnfinishedDefect(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultBoolean>;

export async function proInspectionRecordQueryPointHasUnfinishedDefect(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultBoolean>(`/app/proInspectionRecord/queryPointHasUnfinishedDefect`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultBoolean>(`/app/proInspectionRecord/queryPointHasUnfinishedDefect`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 上报巡检点位记录 POST /proInspectionRecord/report */
export async function proInspectionRecordReport(
  body: BIZAPI.ProInspectionPointRecordReportReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proInspectionRecordReport(
  body: BIZAPI.ProInspectionPointRecordReportReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proInspectionRecordReport(
  body: BIZAPI.ProInspectionPointRecordReportReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proInspectionRecordReport(
  body: BIZAPI.ProInspectionPointRecordReportReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proInspectionRecord/report`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proInspectionRecord/report`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
